//
//  RankListHasContentTableViewCell.m
//  TestApplication
//
//  Created by Hanlingyu on 16/9/21.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "RankListHasContentTableViewCell.h"
#import "ChannelPostRanklist.h"
#import "UIImageView+WebCache.h"
@interface RankListHasContentTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *headerImage;
@property (weak, nonatomic) IBOutlet UIImageView *vipImage;
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;
@property (weak, nonatomic) IBOutlet UILabel *avterNameLabel;

@end

@implementation RankListHasContentTableViewCell


- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        
        
    }
    return self;
}

- (void)setRankList:(ChannelPostRanklist *)rankList {
    _rankList = rankList;
    
    
    [_headerImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://qn.zheli.io/%@", _rankList.avatar]]];
    if (_rankList.isTalent == 0) {
        _vipImage.hidden = YES;
    } else {
        _vipImage.hidden = NO;
        
    }
    
    _avterNameLabel.text = _rankList.uname;
    _numberLabel.text = [NSString stringWithFormat:@"%ld", _rankList.hotPostCount];
}

- (void)layoutSubviews {
    [super layoutSubviews];
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
